#include <iostream>
#include <iomanip>
using namespace std;
long factorial(int n)
{
    if(n == 0)
        return 1;
    long result = 1;
    for(int i = 1; i<=n; i++)
        result = result * i;
    return result;
}
long rfactorial(int n)
{
    if( n == 0)
        return 1;
    else
    {
        long temp = n * factorial(n-1);
        return temp;
    }
}
int main()
{
    int N;
    cin >> N;
    cout << rfactorial(N);
}